package edu.sctu.practice.class01.wujiayi.assing03.practice01;

/**
 * Created by acer1 on 2015/10/22.
 */
public class Rectangle extends GeometricObject {
    public float lengh = 0;
    public float width = 0;
    public float rectanglearea;
    public float rectangleperimeter;

    @Override
    public float findArea() {
        rectanglearea = lengh * width;
        System.out.println("矩形的面积为" + rectanglearea);
        return rectanglearea;
    }

    @Override
    public float findPerimeter() {
        rectangleperimeter = (lengh + width) * 2;
        System.out.println("矩形的周长为" + rectangleperimeter);
        return rectangleperimeter;
    }
}
